package com.fuhe.chen.vendingmachine.service;

import com.fuhe.chen.vendingmachine.dto.cond.AdvertisementCond;
import com.fuhe.chen.vendingmachine.pojo.Advertisement;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IAdvertisementService {
    /**
     * 添加广告信息
     * @param advertisement
     */
    void addAdvertisement(Advertisement advertisement);

    /**
     * 删除广告信息
     * @param advertisementId
     */
    void deleteAdvertisement(@Param("id") Integer advertisementId);

    /**
     * 修改广告信息
     * @param advertisement
     */
    void updateAdvertisement(Advertisement advertisement);

    /**
     * 查询单个广告信息
     * @param advertisementId
     */
    Advertisement findOne(@Param("id") Integer advertisementId);

    /**
     * 根据条件查询广告信息
     * @param
     */
    PageInfo<Advertisement> findByCondition(AdvertisementCond advertisementCond,Integer page,Integer num);

    /**
     * 查询所有广告信息
     * @param page
     * @param num
     * @return
     */
    PageInfo<Advertisement> findAll(int page, int num);
}
